# test_vga.s
# tests the vga functions
#
# connect4-nios2 project
#
# requires - vga.s

.data

# game board array
.align 2
array:
	.skip 42	# 7x6 bytes

.global array
.global main
.text

main:

	call VGA_BLANK_SCREEN

	movi r4, 5		# startx
	movi r5, 5		# starty
	movi r6, 10		# endx
	movi r7, 10		# endy
	movi r8, 0b100	# red
	subi sp, sp, 4
	stw r8, 0(sp)
	call VGA_DRAW_BOX

	movi r4, 50		# startx
	movi r5, 50		# starty
	movi r6, 60		# endx
	movi r7, 80		# endy
	movi r8, 0b010	# green
	subi sp, sp, 4
	stw r8, 0(sp)
	call VGA_DRAW_BOX

	movi r4, 0
	movi r5, 0
	movi r6, 7
	call VGA_PUT_PIXEL

	movi r4, 159
	movi r5, 119
	movi r6, 7
	call VGA_PUT_PIXEL

	ret

	br main
